home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Book of Tells
/
The Book of Tells.iso
/
vidgal.dir
/
00291_Script_291
< prev
next >
Wrap
Text File
|
1994-09-22
|
7KB
|
247 lines
on startMovie
set the puppet of sprite 20 to TRUE
set the puppet of sprite 23 to TRUE
set the puppet of sprite 25 to TRUE
set the puppet of sprite 26 to TRUE
set the puppet of sprite 27 to TRUE
set the puppet of sprite 28 to TRUE
set the puppet of sprite 29 to TRUE
set the puppet of sprite 30 to TRUE
set the puppet of sprite 34 to TRUE
set the visible of sprite 28 to FALSE
set the visible of sprite 29 to FALSE
set the visible of sprite 30 to FALSE
set the visible of sprite 34 to FALSE
set the locH of sprite 28 to -200
set the locH of sprite 29 to -200
set the locH of sprite 30 to -200
set the scriptText of cast 29 = the scriptText of cast 23
set the scriptText of cast 31 = the scriptText of cast 24
set the scriptText of cast 32 = the scriptText of cast 25
set the itemDelimiter = "~"
global lineNum, class, oldInfoBox,audioClip,movieClip,movieSpriteNum
put word 1 of field "Title" into infoBox
put word 2 of field "Title" after infoBox
put line (numberLines - 8) of field infoBox into audioClip
put line (numberLines - 10) of field infoBox into movieClip
-- This is the sprite where the movie is
set movieSpriteNum=6
puppetSprite movieSpriteNum,TRUE
end startMovie
-- ************************************************
-- Name: divide
-- Description:
-- ************************************************
on divide a,b
if b<>0 then
return integer( ((a+0.0) / (b+0.0)) - 0.49 )
else
return 0
end if
end divide
-- ************************************************
-- Name: setTime
-- Description:
-- ************************************************
on setTime
global movieSpriteNum,mStartTime,mStopTime
set tmpc=string(divide( ((the movieTime of sprite movieSpriteNum)-mStartTime),12 )+1 )
set tmpm=string(divide( (mStopTime-mStartTime),12)+1)
-- put (the movieTime of sprite movieSpriteNum)-mStartTime&"/"&(mStopTime-mStartTime)&" --"&tmps into field "time"
put tmpc&"/"&tmpm into field "time"
end setTime
-- ******************************************************
-- Name: buttonAction
-- Description:
--
-- Example: buttonAction(TRUE)
-- ******************************************************
on buttonAction silent
global activated
set activated = TRUE
if not(silent=TRUE) then sound playfile 1, "MouseDown"
set ButtonUpName = the name of cast (the castnum of sprite the ClickOn)
set tmp1=ButtonUpName&"1"
set tmp2=ButtonUpName&"2"
set tmp3=ButtonUpName&"3"
set ButtonDownName = ButtonUpName&"3"
set the castnum of sprite the ClickOn = the number of cast tmp1
updatestage
startTimer
repeat while the timer < 5
end repeat
set the castnum of sprite the ClickOn = the number of cast tmp2
updatestage
startTimer
repeat while the timer < 5
end repeat
set the castnum of sprite the ClickOn = the number of cast tmp3
updatestage
startTimer
repeat while the timer < 5
end repeat
set buttonOn=TRUE
repeat while the stillDown = TRUE
if rollover (the clickOn) = TRUE then
if buttonOn=FALSE then
set buttonON=TRUE
set the castnum of sprite the ClickOn = the number of cast tmp1
updatestage
startTimer
repeat while the timer < 5
end repeat
set the castnum of sprite the ClickOn = the number of cast tmp2
updatestage
startTimer
repeat while the timer < 5
end repeat
set the castnum of sprite the ClickOn = the number of cast tmp3
updatestage
startTimer
repeat while the timer < 5
end repeat
else
set activated = TRUE
set the castnum of sprite the ClickOn = the number of cast ButtonDownName
updatestage
end if
else
set buttonOn=FALSE
set activated = FALSE
set the castnum of sprite the ClickOn = the number of cast ButtonUpName
updatestage
end if
end repeat
if activated = FALSE then exit
set the castnum of sprite the ClickOn = the number of cast ButtonUpName
updatestage
end buttonAction
-- ******************************************************
-- Name: menuSelect
-- Description: Checks the position of the mouse in a text field
-- and highlights the current line. Pass it the number of the
-- text field. The variable lineNum is used internally to
-- stop looping to prevent the highlight from flashing and can
-- also be used externally to pass where the mouse was when the
-- user released the mouse button.
--
-- Example: menuSelect {castNumber)
-- ******************************************************
on menuSelect castNumber
global lineNum
global bottoma
global topa
set lineNum = 0
set hiliteSet = 0
set mousePos = 0
repeat while the stillDown
if the mouseCast = the number of cast (castNumber) then
if lineNum = (the mouseLine) and the mouseV = mousePos then
nothing
else if the mouseLine = -1 then
set the hilite of field (castNumber) to 0
set lineNum = 0
-- else if the mouseH > 680 then
-- set the hilite of field (castNumber) to 0
-- set lineNum = 0
--
-- else if the mouseH < 5 then
-- set the hilite of field (castNumber) to 0
-- set lineNum = (the mouseLine)
--
-- else if the mouseV < 13 then
-- set the hilite of field (castNumber) to 0
-- set lineNum = 0
--
-- else if the mouseV > 400 then
-- set the hilite of field (castNumber) to 0
-- set lineNum = 0
--
else
hilite line (the mouseLine) of field (castNumber)
set lineNum = (the mouseLine)
set mousePos = the mouseV
end if
else
set the hilite of field (castNumber) to 0
set lineNum = 0
end if
end repeat
end menuSelect
-- ******************************************************
-- Name: putHelp
-- Description:
--
-- Example:
-- ******************************************************
on putHelp castMemName,spriteNum
set hInstance = the mouseh
set vInstance = the mousev
set the castNum of sprite spriteNum to the number of cast castMemName
set the loch of sprite spriteNum to hInstance
set the locv of sprite spriteNum to vInstance
updateStage
repeat while the stilldown
end repeat
set the loch of sprite spriteNum to -300
set the loch of sprite spriteNum to -300
updateStage
end putHelp